<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<div id="app">
    name:{{name}}<br/>
    <heima></heima>
    <heima></heima>
    <heima></heima>
    <heima></heima>
    <heima></heima>
    <heima></heima>
</div>

<script src="./node_modules/vue/dist/vue.js"></script>
<script>
    Vue.component("heima", {
        template: `
<div>
<button @click='add'>我现在次数是{{info}}次</button>
{{name}},{{age}}
</div>
`,
        data() {
            return {
                info: 0,
                name:"刘德华",
                age:50
            }
        },
        methods:{
            add(){
               return this.info++
            }
        }
    })
    let vm = new Vue({
        el: "#app",
        data: {
            name: "这是黑马63主组件"
        }
    })
</script>
</body>
</html>